/**
 * Cambia el campo de la tabla b_tiene_consulta
 * @author Roberto J. Blasco
 * @version 1.0
 * @param {JSEvent} event the event that triggered the action
 * @private
 *
 * @properties={typeid:24,uuid:"9E4A5E1D-59EF-42C1-A1E6-86EC2685BA9B"}
 */
function cambiar_tiene_consulta(event) {

	if (foundset.getSelectedRecord().b_tiene_consulta == 1){
		foundset.getSelectedRecord().b_tiene_consulta = 0;
	}else{
		foundset.getSelectedRecord().b_tiene_consulta = 1;
	}
}

/**
 * Cambia el campo de la tabla b_tiene_grabacion
 * @author Roberto J. Blasco
 * @version 1.0
 * @param {JSEvent} event the event that triggered the action
 * @private
 *
 * @properties={typeid:24,uuid:"F03B2A8A-0BC5-4635-835F-301E55043E1B"}
 */
function cambiar_tiene_grabacion(event) {

	if (foundset.getSelectedRecord().b_tiene_grabacion == 1){
		foundset.getSelectedRecord().b_tiene_grabacion = 0;
	}else{
		foundset.getSelectedRecord().b_tiene_grabacion = 1;
	}
}

/**
 * Cambia el campo de la tabla b_tiene_borrado
 * @author Roberto J. Blasco
 * @version 1.0
 * @param {JSEvent} event the event that triggered the action
 * @private
 *
 * @properties={typeid:24,uuid:"EC5BF49D-1BAC-4C74-89B5-87DD6B66D949"}
 */
function cambiar_tiene_borrado(event) {

	if (foundset.getSelectedRecord().b_tiene_borrado == 1){
		foundset.getSelectedRecord().b_tiene_borrado = 0;
	}else{
		foundset.getSelectedRecord().b_tiene_borrado = 1;
	}
}

/**
 * Called before the form component is rendered.<br>Pinta el campo en función del valor
 * @author Roberto J. Blasco
 * @version 1.0
 * @param {JSRenderEvent} event the render event
 * @private
 * @properties={typeid:24,uuid:"B9A342CD-8266-4D36-B22F-DBB3FCBCBEED"}
 */
function onRender_b_tiene_consulta(event) {
	
	/** @type {JSRecord<db:/pigeon_board/adm_t900_roles>} */
	var record = event.getRecord()
	
	if (record && record.b_tiene_consulta == 1) {
		event.getRenderable().fgcolor = 'green';
	} else  {
		event.getRenderable().fgcolor = 'red';
	}
}

/**
 * Called before the form component is rendered.<br>Pinta el campo en función del valor
 * @author Roberto J. Blasco
 * @version 1.0
 * @param {JSRenderEvent} event the render event
 * @private
 * @properties={typeid:24,uuid:"AB012952-2C11-4CF2-843D-43E59D38CB49"}
 */
function onRender_b_tiene_grabacion(event) {
	
	/** @type {JSRecord<db:/pigeon_board/adm_t900_roles>} */
	var record = event.getRecord()
	
	if (record && record.b_tiene_grabacion == 1) {
		event.getRenderable().fgcolor = 'green';
	} else  {
		event.getRenderable().fgcolor = 'red';
	}
}

/**
 * Called before the form component is rendered.<br>Pinta el campo en función del valor
 * @author Roberto J. Blasco
 * @version 1.0
 * @param {JSRenderEvent} event the render event
 * @private
 * @properties={typeid:24,uuid:"2E8F6094-29DC-4730-B673-C86D7D29E7E5"}
 */
function onRender_b_tiene_borrado(event) {
	
	/** @type {JSRecord<db:/pigeon_board/adm_t900_roles>} */
	var record = event.getRecord()
	
	if (record && record.b_tiene_borrado == 1) {
		event.getRenderable().fgcolor = 'green';
	} else  {
		event.getRenderable().fgcolor = 'red';
	}
}
